function menuActive() {
  let menuActive = sessionStorage.getItem("menuActive");
  if (!menuActive) {
    menuActive = "http://localhost:8080/toWelcome";
  }
  $(".list-group").find("a").each(function (index, item) {
    if (menuActive === item.href) {
      $(item).addClass("active");
    } else {
      $(item).removeClass("active");
    }
  })

  $(".list-group").find("a").click(function () {
    console.log(this.href);
    sessionStorage.setItem("menuActive", this.href);
    $(this).addClass("active");
  });
}

$(document).ready(function () {
  $("#btn_logout").click(function () {
    let cfm = confirm("确认是否注销当前用户?");
    if (cfm) {
      location.href = "http://localhost:8080/admin/logout";
    }
  });
});